import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JList;
import javax.swing.BoxLayout;
import java.awt.GridLayout;
import java.awt.Dimension;
import javax.swing.JButton;
import javax.swing.AbstractListModel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import java.awt.Font;


public class VManageRobot extends JFrame {
	private static final long serialVersionUID = 6820304199490693699L;
	private JPanel contentPane;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					VManageRobot frame = new VManageRobot();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public VManageRobot() {
		setPreferredSize(new Dimension(300, 500));
		setMinimumSize(new Dimension(300, 500));
		setMaximumSize(new Dimension(300, 500));
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 615, 539);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel panel_content = new JPanel();
		panel_content.setBorder(null);
		contentPane.add(panel_content, BorderLayout.CENTER);
		panel_content.setLayout(new BoxLayout(panel_content, BoxLayout.X_AXIS));
		
		JPanel panel_manage = new JPanel();
		panel_manage.setBorder(null);
		panel_content.add(panel_manage);
		panel_manage.setLayout(new BoxLayout(panel_manage, BoxLayout.Y_AXIS));
		
		JList list_typeRobot = new JList();
		list_typeRobot.setFont(new Font("Tahoma", Font.PLAIN, 13));
		list_typeRobot.setModel(new AbstractListModel() {
			private static final long serialVersionUID = -7723132864771790195L;
			String[] values = new String[] {"Type chenille", "Type pattes"};
			public int getSize() {
				return values.length;
			}
			public Object getElementAt(int index) {
				return values[index];
			}
		});
		list_typeRobot.setMinimumSize(new Dimension(300, 460));
		list_typeRobot.setMaximumSize(new Dimension(300, 460));
		list_typeRobot.setPreferredSize(new Dimension(300, 460));
		panel_manage.add(list_typeRobot);
		
		JPanel panel = new JPanel();
		panel.setPreferredSize(new Dimension(300, 40));
		panel.setMinimumSize(new Dimension(300, 40));
		panel_manage.add(panel);
		panel.setLayout(new GridLayout(0, 3, 0, 0));
		
		JButton btn_addType = new JButton("Ajouter");
		panel.add(btn_addType);
		
		JButton btn_delType = new JButton("Supprimer");
		panel.add(btn_delType);
		
		JButton btn_editType = new JButton("Modifier");
		panel.add(btn_editType);
		
		JPanel panel_edit = new JPanel();
		panel_edit.setBorder(null);
		panel_edit.setPreferredSize(new Dimension(300, 500));
		panel_edit.setMinimumSize(new Dimension(300, 500));
		panel_edit.setMaximumSize(new Dimension(300, 500));
		panel_content.add(panel_edit);
		panel_edit.setLayout(new BoxLayout(panel_edit, BoxLayout.X_AXIS));
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null},
				{null, null},
				{null, null},
				{null, null},
			},
			new String[] {
				"New column", "New column"
			}
		));
		table.setMinimumSize(new Dimension(300, 500));
		table.setMaximumSize(new Dimension(300, 500));
		table.setBorder(null);
		table.setPreferredSize(new Dimension(300, 500));
		panel_edit.add(table);
	}

}
